library(tidyverse)
library(here)
library(plotly)
df <- read_csv(here('ESS_faculty/data/ESS_H.csv'))
 ggplotly(df %>% 
 
    ggplot(aes(x = Years, y = H, color = Name)) +
  geom_point() +
    theme_linedraw() +
    labs(x = "Years since PhD", y = "H index")
  )
bar_df <- read_csv(here('ESS_faculty/data/H_bar.csv'))

ggplotly(bar_df %>% 
  ggplot() +
  geom_col(aes(x = Name, y = H, fill = Years)) +
  theme_linedraw() +
  theme(axis.text.x = element_text(angle = 90)) +
  labs(y = 'H index', x = ''))
ggplotly(bar_df %>% 
            ggplot(aes(x = Years, y = H, color = Name)) +
            geom_point() +
           labs(y = 'H index', x = 'Years since PhD') +
           theme_linedraw() +
           theme(legend.title = element_blank())
         )
ggplotly(bar_df %>% 
            ggplot() +
            geom_col(aes(x = Years, y = H, fill = Name)) +
           labs(y = 'Years since PhD', x = 'H index') +
           theme_linedraw() +
           theme(legend.title = element_blank())
         )